﻿<script src="/static/js/jquery-2.1.1.js"></script>
<script src="/static/bootstrap/js/bootstrap.js"></script>
<link href="/static/bootstrap/css/bootstrap.min.css" rel="stylesheet"/>
<link href="/static/layui/css/layui.css" rel="stylesheet"/>
<script src="/static/layui/layui.js"></script>

<style>
    .layui-inline{margin-bottom:15px;display: inline-block}
    .layui-input-block{margin-left:0px!important;}
    .layui-table th{text-align: center}
    .title{width:150px;text-align: center}
    .show_multiple{width:100%}
    .newimg{display: inline-block;margin-left:10px}
    .newimg img{height:100px;float: left}
    .images_del{text-align: center}
</style>
<div class="modal-body">

    <!--layui-form-pane-->
    <form class="layui-form layui-form-pane form-horizontal" name="addProcedure" action="" >


        {if condition="count($project_type) gt 0"}
        <div class="layui-form-item layui-col-md12">
            <label class="layui-form-label">项目类型</label>
            <div class="input-group col-xs-7" style="float: left">
                <select class="layui-select" name="sub_id" lay-search="''">
                    <option value="">请选择</option>
                    {volist name="project_type" id="vo"}
                    <option value="{$vo.id}" {if condition="$detail.sub_id eq $vo.id"} selected {/if}>{$vo.name}</option>
                    {/volist}
                </select>
            </div>
        </div>
        {/if}

        <div class="layui-form-item layui-col-md12" style="display: none">
            <label class="layui-form-label">完成情况</label>
            <div class="input-group col-xs-5" style="float: left">
                <select class="layui-select" name="status">
                    <option value="">请选择</option>
                    <option value="1" selected >已完成</option>
                </select>
            </div>
        </div>


        <div class="layui-form-item layui-col-md12">
            <label class="layui-form-label">详细计划</label>
            <div class="input-group col-xs-7" style="float: left">
                <textarea placeholder="请输入内容" class="layui-textarea" name="content">{$detail.content}</textarea>
            </div>
        </div>

        <div class="layui-form-item layui-col-md12">
            <label class="layui-form-label">展示内容</label>
            <div class="input-group col-xs-7" style="float: left">
                <input type="text" class="layui-input" name="declare_schedule" placeholder="完成进度" value="{$detail.declare_schedule}">
            </div>
        </div>


        {if condition="$detail['declare_content']!=''"}
        <div class="layui-form-item layui-col-md12">
            <label class="layui-form-label">申报内容</label>
            <div class="input-group col-xs-7" style="float: left">
                <textarea placeholder="申报内容" class="layui-textarea" name="declare_content" disabled style="background-color: #f7f7f7">{$detail.declare_content}</textarea>
            </div>
        </div>

        {if condition="$detail['declare_image'] neq ''"}
        <div class="layui-form-item layui-col-md12" style="width:100%">
            <label class="layui-form-label">*图组</label>
            <!--存储上传的图片信息-->
            <div class="input-group col-xs-7">
                    <!--<div id="images_upload" ><img src="/static/images/upload.jpeg" style="width:100px;height:100px;"></div>-->
                    <div class="input-group show_multiple row">
                        {volist name="$detail['declare_image']" id="vo1"}
                        <div class="newimg">
                            <img src="{$vo1}" onclick="visitImg('{$vo1}');"  ><input type="hidden" name="images[]" value="{$vo1}">
                            <!--<div class="images_del" >删除</div>-->
                        </div>
                        {/volist}
                    </div>
            </div>
        </div>
        {/if}

        <div class="layui-form-item layui-col-md12">
            <label class="layui-form-label">备注</label>
            <div class="input-group col-xs-7" style="float: left">
                <textarea placeholder="备注" class="layui-textarea" name="declare_remark" >{$detail.declare_remark}</textarea>
            </div>
        </div>
        {/if}

        {if condition="$detail['declare_status'] neq 0"}
        <div class="layui-form-item layui-col-md12">
            <label class="layui-form-label">审核时间</label>
            <div class="input-group col-xs-7" style="float: left">
                <input type="text" value='{$detail.declare_time|Date="Y-m-d H:i:s",###}' class="layui-input" disabled>
            </div>
        </div>
        {/if}
        {if condition="$detail['declare_status'] eq 0 & $detail['declare_content']!=''"}
        <div class="layui-form-item layui-col-md12">
            <label class="layui-form-label">审核状态</label>
            <div class="input-group col-xs-7" style="float: left">
                <input type="radio" name="declare_status" value="1" title="审核通过" {if condition="$detail['declare_status'] eq 1"} checked {/if}>
                <input type="radio" name="declare_status" value="2" title="审核驳回" {if condition="$detail['declare_status'] eq 2"} checked {/if}>
                <input type="radio" name="declare_status" value="3" title="计划未完成" {if condition="$detail['declare_status'] eq 3"} checked {/if}>
            </div>
        </div>
        {/if}

    </form>

</div>
<script>
    function visitImg(imgUrl) {
        layer.photos({
            photos : {
                "title" : "",
                "id" : 123,
                "start" : 0,
                "data" : [
                    {
                        "alt" : "",
                        "pid" : 666,
                        "src" : imgUrl,
                        "thumb" : ""
                    } ]
            }
        });
    }
    layui.use(['form','jquery','layer','laydate','table','upload'], function() { //独立版的layer无需执行这一句
        var $ = layui.jquery, layer = layui.layer,upload = layui.upload;;
        var form = layui.form;
        var laydate = layui.laydate;
        var table = layui.table //表格



        layui.form.render('select');
    });

</script>